Skip to content

ci: Add testing using Jenkins pipeline#667

Merged
cgwalters merged 5 commits intocoreos:masterfrom
jlebon:pr/jenkins
Jul 26, 2019
Merged

ci: Add testing using Jenkins pipeline#667
cgwalters merged 5 commits intocoreos:masterfrom
jlebon:pr/jenkins

Conversation

@jlebon
Copy link
Copy Markdown
Member

@jlebon jlebon commented Jul 25, 2019

Start running tests in CentOS CI. We build it, run the unit tests, and
in parallel run through a simplified version of the FCOS pipeline
including running kola on the built image.

This is just a start of course. In the future, we could e.g. test each
command more deeply, such as lockfile semantics, overrides, etc...

This uses the projectatomic-ci namespace for now, where we have
resources and permissions set up. Once we're willing to commit more to
this workflow, we can move to a coreos-ci namespace (and let
projectatomic-ci die peacefully).

jlebon added 5 commits July 25, 2019 14:06
We're not doing that anymore, so clean things up to make it easier to
hack on. Also drop the corresponding el7 Dockerfile.
I'd like the `make check` and `make unittest` targets to be separate
stages from building for CI purposes. So just drop that out of the build
script, and make it part of the Dockerfile itself so we're still running
the tests when building the image.
For building, we were putting `cmdlib.sh` in the root of the container
build dir. But I want to be able to use `build.sh` from a git checkout,
so rebuild that same layout.

Also drop the direct reference to `/root/containerbuild` for the same
reason.

And also add the motivation for why the `Dockerfile` calls `build.sh` in
multiple steps like this.
Allow calling `build.sh` without any arguments to be equivalent to going
through all the build steps one after the other. This will be used in a
CI context.
Start running tests in CentOS CI. We build it, run the unit tests, and
in parallel run through a simplified version of the FCOS pipeline
including running `kola` on the built image.

This is just a start of course. In the future, we could e.g. test each
command more deeply, such as lockfile semantics, overrides, etc...

This uses the `projectatomic-ci` namespace for now, where we have
resources and permissions set up. Once we're willing to commit more to
this workflow, we can move to a `coreos-ci` namespace (and let
`projectatomic-ci` die peacefully).
Copy link
Copy Markdown
Contributor

@ajeddeloh ajeddeloh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly minor nits. I am no jenkins guru so I don't have much to say about the last commit. Otherwise LGTM

else
echo 1>&2 "should be on either RHEL or Fedora"
if ! grep -q '^Fedora' /etc/redhat-release; then
echo 1>&2 "should be on either Fedora"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/either Fedora/Fedora

# Add continuous tag for latest build tools and mark as required so we
# can depend on those latest tools being available in all container
# builds.
echo -e "[f$release-coreos-continuous]\nenabled=1\nmetadata_expire=1m\nbaseurl=https://kojipkgs.fedoraproject.org/repos-dist/f$release-coreos-continuous/latest/\$basearch/\ngpgcheck=0\nskip_if_unavailable=False\n" > /etc/yum.repos.d/coreos.repo
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could replace this with a heredoc to make the \n's a little easier to understand, but that can wait for a different PR if you want.

if [ -n "${ISFEDORA}" ]; then
rpm -q grubby && yum remove -y grubby
fi
rpm -q grubby && yum remove -y grubby
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

stale comment

Copy link
Copy Markdown
Member

@cgwalters cgwalters left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great to me!

kind: Pod
spec:
# XXX: tmp hack to get anyuid SCC; need to ask to get jenkins SA added
serviceAccountName: papr
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fine for now, though if we start spreading this across multiple projects I think this is the kind of thing we'll want to abstract out.

@cgwalters cgwalters merged commit eec7ddf into coreos:master Jul 26, 2019
jlebon added a commit to jlebon/rpm-ostree that referenced this pull request Sep 6, 2019
This is an experiment in using Jenkins pipelines for our CI. See similar
initiatives in coreos-assembler[1] and fedora-coreos-config[2].

For now, this only does the following testing:
- checks commit for unintended submodule bumps
- checks the minimum Rust version
- checks that it can build an RPM
- builds FCOS (with the new binaries both for executing the build
  itself, as well as included in the built OS)

There are dummy placeholders for where we'd actually run the vmcheck
and the compose testsuites.

[1] coreos/coreos-assembler#667
[2] coreos/fedora-coreos-config#131
jlebon added a commit to jlebon/rpm-ostree that referenced this pull request Sep 6, 2019
This is an experiment in using Jenkins pipelines for our CI. See similar
initiatives in coreos-assembler[1] and fedora-coreos-config[2].

For now, this only does the following testing:
- checks commit for unintended submodule bumps
- checks the minimum Rust version
- builds RPMs
- builds FCOS (with the new RPMs both for executing the build
  itself, as well as included in the built OS)

There are dummy placeholders for where we'd actually run the vmcheck
and the compose testsuites.

[1] coreos/coreos-assembler#667
[2] coreos/fedora-coreos-config#131
jlebon added a commit to jlebon/rpm-ostree that referenced this pull request Sep 6, 2019
This is an experiment in using Jenkins pipelines for our CI. See similar
initiatives in coreos-assembler[1] and fedora-coreos-config[2].

For now, this only does the following testing:
- checks commit for unintended submodule bumps
- checks the minimum Rust version
- builds RPMs
- builds FCOS (with the new RPMs both for executing the build
  itself, as well as included in the built OS)

There are dummy placeholders for where we'd actually run the vmcheck
and the compose testsuites.

[1] coreos/coreos-assembler#667
[2] coreos/fedora-coreos-config#131
jlebon added a commit to jlebon/rpm-ostree that referenced this pull request Sep 6, 2019
This is an experiment in using Jenkins pipelines for our CI. See similar
initiatives in coreos-assembler[1] and fedora-coreos-config[2].

For now, this only does the following testing:
- checks commit for unintended submodule bumps
- checks the minimum Rust version
- builds RPMs
- builds FCOS (with the new RPMs both for executing the build
  itself, as well as included in the built OS)

There are dummy placeholders for where we'd actually run the vmcheck
and the compose testsuites. Let's address those trickier parts as
follow-ups.

[1] coreos/coreos-assembler#667
[2] coreos/fedora-coreos-config#131
jlebon added a commit to jlebon/rpm-ostree that referenced this pull request Sep 10, 2019
This is an experiment in using Jenkins pipelines for our CI. See similar
initiatives in coreos-assembler[1] and fedora-coreos-config[2].

For now, this only does the following testing:
- checks commit for unintended submodule bumps
- checks the minimum Rust version
- builds RPMs
- builds FCOS (with the new RPMs both for executing the build
  itself, as well as included in the built OS)

There are dummy placeholders for where we'd actually run the vmcheck
and the compose testsuites. Let's address those trickier parts as
follow-ups.

[1] coreos/coreos-assembler#667
[2] coreos/fedora-coreos-config#131
jlebon added a commit to jlebon/rpm-ostree that referenced this pull request Sep 12, 2019
This is an experiment in using Jenkins pipelines for our CI. See similar
initiatives in coreos-assembler[1] and fedora-coreos-config[2].

For now, this only does the following testing:
- checks commit for unintended submodule bumps
- checks the minimum Rust version
- builds RPMs
- builds FCOS (with the new RPMs both for executing the build
  itself, as well as included in the built OS)

There are dummy placeholders for where we'd actually run the vmcheck
and the compose testsuites. Let's address those trickier parts as
follow-ups.

[1] coreos/coreos-assembler#667
[2] coreos/fedora-coreos-config#131
jlebon added a commit to jlebon/rpm-ostree that referenced this pull request Sep 12, 2019
This is an experiment in using Jenkins pipelines for our CI. See similar
initiatives in coreos-assembler[1] and fedora-coreos-config[2].

For now, this only does the following testing:
- checks commit for unintended submodule bumps
- checks the minimum Rust version
- builds RPMs
- builds FCOS (with the new RPMs both for executing the build
  itself, as well as included in the built OS)

There are dummy placeholders for where we'd actually run the vmcheck
and the compose testsuites. Let's address those trickier parts as
follow-ups.

[1] coreos/coreos-assembler#667
[2] coreos/fedora-coreos-config#131
jlebon added a commit to jlebon/rpm-ostree that referenced this pull request Sep 13, 2019
This is an experiment in using Jenkins pipelines for our CI. See similar
initiatives in coreos-assembler[1] and fedora-coreos-config[2].

For now, this only does the following testing:
- checks commit for unintended submodule bumps
- checks the minimum Rust version
- builds RPMs
- builds FCOS (with the new RPMs both for executing the build
  itself, as well as included in the built OS)

There are dummy placeholders for where we'd actually run the vmcheck
and the compose testsuites. Let's address those trickier parts as
follow-ups.

[1] coreos/coreos-assembler#667
[2] coreos/fedora-coreos-config#131
jlebon added a commit to jlebon/rpm-ostree that referenced this pull request Sep 13, 2019
This is an experiment in using Jenkins pipelines for our CI. See similar
initiatives in coreos-assembler[1] and fedora-coreos-config[2].

For now, this only does the following testing:
- checks commit for unintended submodule bumps
- checks the minimum Rust version
- builds RPMs
- builds FCOS (with the new RPMs both for executing the build
  itself, as well as included in the built OS)

There are dummy placeholders for where we'd actually run the vmcheck
and the compose testsuites. Let's address those trickier parts as
follow-ups.

[1] coreos/coreos-assembler#667
[2] coreos/fedora-coreos-config#131
rh-atomic-bot pushed a commit to coreos/rpm-ostree that referenced this pull request Sep 13, 2019
This is an experiment in using Jenkins pipelines for our CI. See similar
initiatives in coreos-assembler[1] and fedora-coreos-config[2].

For now, this only does the following testing:
- checks commit for unintended submodule bumps
- checks the minimum Rust version
- builds RPMs
- builds FCOS (with the new RPMs both for executing the build
  itself, as well as included in the built OS)

There are dummy placeholders for where we'd actually run the vmcheck
and the compose testsuites. Let's address those trickier parts as
follow-ups.

[1] coreos/coreos-assembler#667
[2] coreos/fedora-coreos-config#131

Closes: #1899
Approved by: cgwalters
rh-atomic-bot pushed a commit to coreos/rpm-ostree that referenced this pull request Sep 13, 2019
This is an experiment in using Jenkins pipelines for our CI. See similar
initiatives in coreos-assembler[1] and fedora-coreos-config[2].

For now, this only does the following testing:
- checks commit for unintended submodule bumps
- checks the minimum Rust version
- builds RPMs
- builds FCOS (with the new RPMs both for executing the build
  itself, as well as included in the built OS)

There are dummy placeholders for where we'd actually run the vmcheck
and the compose testsuites. Let's address those trickier parts as
follow-ups.

[1] coreos/coreos-assembler#667
[2] coreos/fedora-coreos-config#131

Closes: #1899
Approved by: cgwalters
rh-atomic-bot pushed a commit to coreos/rpm-ostree that referenced this pull request Sep 15, 2019
This is an experiment in using Jenkins pipelines for our CI. See similar
initiatives in coreos-assembler[1] and fedora-coreos-config[2].

For now, this only does the following testing:
- checks commit for unintended submodule bumps
- checks the minimum Rust version
- builds RPMs
- builds FCOS (with the new RPMs both for executing the build
  itself, as well as included in the built OS)

There are dummy placeholders for where we'd actually run the vmcheck
and the compose testsuites. Let's address those trickier parts as
follow-ups.

[1] coreos/coreos-assembler#667
[2] coreos/fedora-coreos-config#131

Closes: #1899
Approved by: cgwalters
rh-atomic-bot pushed a commit to coreos/rpm-ostree that referenced this pull request Sep 16, 2019
This is an experiment in using Jenkins pipelines for our CI. See similar
initiatives in coreos-assembler[1] and fedora-coreos-config[2].

For now, this only does the following testing:
- checks commit for unintended submodule bumps
- checks the minimum Rust version
- builds RPMs
- builds FCOS (with the new RPMs both for executing the build
  itself, as well as included in the built OS)

There are dummy placeholders for where we'd actually run the vmcheck
and the compose testsuites. Let's address those trickier parts as
follow-ups.

[1] coreos/coreos-assembler#667
[2] coreos/fedora-coreos-config#131

Closes: #1899
Approved by: cgwalters
rh-atomic-bot pushed a commit to coreos/rpm-ostree that referenced this pull request Sep 16, 2019
This is an experiment in using Jenkins pipelines for our CI. See similar
initiatives in coreos-assembler[1] and fedora-coreos-config[2].

For now, this only does the following testing:
- checks commit for unintended submodule bumps
- checks the minimum Rust version
- builds RPMs
- builds FCOS (with the new RPMs both for executing the build
  itself, as well as included in the built OS)

There are dummy placeholders for where we'd actually run the vmcheck
and the compose testsuites. Let's address those trickier parts as
follow-ups.

[1] coreos/coreos-assembler#667
[2] coreos/fedora-coreos-config#131

Closes: #1899
Approved by: cgwalters
rh-atomic-bot pushed a commit to coreos/rpm-ostree that referenced this pull request Sep 16, 2019
This is an experiment in using Jenkins pipelines for our CI. See similar
initiatives in coreos-assembler[1] and fedora-coreos-config[2].

For now, this only does the following testing:
- checks commit for unintended submodule bumps
- checks the minimum Rust version
- builds RPMs
- builds FCOS (with the new RPMs both for executing the build
  itself, as well as included in the built OS)

There are dummy placeholders for where we'd actually run the vmcheck
and the compose testsuites. Let's address those trickier parts as
follow-ups.

[1] coreos/coreos-assembler#667
[2] coreos/fedora-coreos-config#131

Closes: #1899
Approved by: cgwalters
rh-atomic-bot pushed a commit to coreos/rpm-ostree that referenced this pull request Sep 17, 2019
This is an experiment in using Jenkins pipelines for our CI. See similar
initiatives in coreos-assembler[1] and fedora-coreos-config[2].

For now, this only does the following testing:
- checks commit for unintended submodule bumps
- checks the minimum Rust version
- builds RPMs
- builds FCOS (with the new RPMs both for executing the build
  itself, as well as included in the built OS)

There are dummy placeholders for where we'd actually run the vmcheck
and the compose testsuites. Let's address those trickier parts as
follow-ups.

[1] coreos/coreos-assembler#667
[2] coreos/fedora-coreos-config#131

Closes: #1899
Approved by: cgwalters
rh-atomic-bot pushed a commit to coreos/rpm-ostree that referenced this pull request Sep 17, 2019
This is an experiment in using Jenkins pipelines for our CI. See similar
initiatives in coreos-assembler[1] and fedora-coreos-config[2].

For now, this only does the following testing:
- checks commit for unintended submodule bumps
- checks the minimum Rust version
- builds RPMs
- builds FCOS (with the new RPMs both for executing the build
  itself, as well as included in the built OS)

There are dummy placeholders for where we'd actually run the vmcheck
and the compose testsuites. Let's address those trickier parts as
follow-ups.

[1] coreos/coreos-assembler#667
[2] coreos/fedora-coreos-config#131

Closes: #1899
Approved by: cgwalters
rh-atomic-bot pushed a commit to coreos/rpm-ostree that referenced this pull request Sep 18, 2019
This is an experiment in using Jenkins pipelines for our CI. See similar
initiatives in coreos-assembler[1] and fedora-coreos-config[2].

For now, this only does the following testing:
- checks commit for unintended submodule bumps
- checks the minimum Rust version
- builds RPMs
- builds FCOS (with the new RPMs both for executing the build
  itself, as well as included in the built OS)

There are dummy placeholders for where we'd actually run the vmcheck
and the compose testsuites. Let's address those trickier parts as
follow-ups.

[1] coreos/coreos-assembler#667
[2] coreos/fedora-coreos-config#131

Closes: #1899
Approved by: cgwalters
@jlebon jlebon deleted the pr/jenkins branch July 6, 2020 20:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants